package com.xl98.entity;

import com.baomidou.mybatisplus.annotation.*;

import java.util.Date;
import java.io.Serializable;
import java.util.List;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 
 * </p>
 *
 * @author ls
 * @since 2020-05-22
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value="Comment对象", description="")
public class Comment implements Serializable {

    private static final long serialVersionUID=1L;

    @ApiModelProperty(value = "主键")
    @TableId(value = "id", type = IdType.ID_WORKER)
    private String id;

    @ApiModelProperty(value = " 发表的用户（外键）")
    private String fromUserId;

    @ApiModelProperty(value = " 评论内容")
    private String msgContent;

    @ApiModelProperty(value = " 评论文章的id（外键）")
    private String articleId;

    @ApiModelProperty(value = "点赞数")
    private Integer starCount;

    @ApiModelProperty(value = "踩数")
    private Integer dissCount;

    @ApiModelProperty(value = " 评论日期")
    @TableField(fill = FieldFill.INSERT)
    private Date createTime;

    @ApiModelProperty(value = " 父评论的id")
    private String parentId;

    @ApiModelProperty(value = " 父评论的id")
    List<Comment> child;

    @ApiModelProperty(value = "逻辑删除")
    @TableLogic
    private Integer deleted;
}
